{include file="Public:header2"/}
<body style="min-height: 100%;background-color: #fff">
<style>
    .qipao{
        position: absolute;
        top: 21%;
        left: 3%;
        border-radius: 36px;
        height: 45px;
        width: 45px;
        line-height: 45px;
        text-align: center;
        background-color: #e6e6e6;
    }
    .content_class{
        position: relative;
        border-bottom: 1px solid #999;
        width: 580px;
        margin-bottom: 33px;
    }
    .content_content{
        margin-left: 24px;
    }
</style>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <form onsubmit="return false;">
                        <div class="layui-form" wid100 lay-filter="">
                            <div class="content_class">
                                <div>
                                    <p class="qipao">左</p>
                                </div>
                                <div class="content_content">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">抽数</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="left_count" value="{if $info.left_count}{$info.left_count}{/if}" placeholder="请输入抽数" autocomplete="off" class="layui-input"  style="width: 300px">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">标题</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="left_title" value="{if $info.left_title}{$info.left_title}{/if}" placeholder="请输入标题" autocomplete="off" class="layui-input"  style="width: 300px">
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="content_class">
                                <div>
                                    <p class="qipao">中</p>
                                </div>
                                <div class="content_content">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">抽数</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="center_count" value="{if $info.center_count}{$info.center_count}{/if}" placeholder="请输入抽数" autocomplete="off" class="layui-input"  style="width: 300px">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">标题</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="center_title" value="{if $info.center_title}{$info.center_title}{/if}" placeholder="请输入标题" autocomplete="off" class="layui-input"  style="width: 300px">
                                        </div>
                                    </div>

                                    <div class="layui-form-item">
                                        <label class="layui-form-label">必中卡等级</label>
<!--                                        {$info.center_shang_id}-->
                                        <div class="layui-input-inline">
                                            <select name="center_shang_id">
                                                <option  value="">--请选择--</option>
                                                {foreach name="shang" item="vo"}
                                                    <option value="{$vo.id}"  {if condition="$info.center_shang_id eq $vo['id']"} selected{/if}>{$vo.title}</option>
                                                {/foreach}
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="content_class">
                                <div>
                                    <p class="qipao">右</p>
                                </div>
                                <div class="content_content">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">抽数</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="right_count" value="{if $info.right_count}{$info.right_count}{/if}" placeholder="请输入抽数" autocomplete="off" class="layui-input"  style="width: 300px">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">标题</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="right_title" value="{if $info.right_title}{$info.right_title}{/if}" placeholder="请输入标题" autocomplete="off" class="layui-input"  style="width: 300px">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">必中卡等级</label>
                                        <!--                                        {$info.center_shang_id}-->
                                        <div class="layui-input-inline">
                                            <select name="right_shang_id">
                                                <option  value="">--请选择--</option>
                                                {foreach name="shang" item="vo"}
                                                <option value="{$vo.id}"  {if condition="$info.right_shang_id eq $vo['id']"} selected{/if}>{$vo.title}</option>
                                                {/foreach}
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn" onclick="return check()">确认保存</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="Public:footer"/}
</body>
</html>
<script type="text/javascript">
    layui.use(['layer','form','upload','element'], function(){
        var $ = layui.$;
        var upload = layui.upload;
        var element = layui.element;


    });

    function check(){
        var url="{:url('/admin/card_set')}";
        var $ = layui.$;
        var load=layer.load(2);
        $.post(url,$("form").serialize(),function(data){
            if(data.status==1){
                layer.msg(data.msg,{icon:1,time:1000},function(){
                    location.reload();
                });
            }else{
                layer.msg(data.msg,{icon:2,anim:6,time:1500},function(){
                    layer.close(load);
                });
            }
        })
    }
</script>